import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:love_app/pages/app/has_lover.dart';
import 'package:love_app/routes/application.dart';
import 'package:love_app/routes/route_handlers.dart';

// 配置fluro路由插件
class Routes{
  // static String root = "/";
  static String addLoveDynamicPage = '/addLoveDynamic';
  static String loveRecord = '/loveRecord';
  static String showImagesUI = '/showImagesUI';
  static String detailsItem = '/detailsItem';
  static String loveGralley = '/loveGralley';
  static String showGralley = '/showGralley';
  static String communityShowImageUI = '/communityShowImageUI';
  static String detailsPage = '/detailsPage';
  static String appIndexPage = '/appIndexPage';
  static String loginPage = '/loginPage';
  static String bugTest = '/bugTest';
  static String newBottomBar = '/newBottomBar';
  static String oldBottomBar = '/oldBottomBar';
  static String loveTree = '/loveTree';
  static String loveCard = '/loveCard';
  static String loveRegister = '/loveRegister';
  static String loveMessage = '/loveMessage';
  static String myWallet = '/myWallet';
  static String testCenter = '/testCenter';
  static String diamondRecharge = '/diamondRecharge';
  static String registerPage = '/registerPage';
  static String appTest = '/appTest';
  static String chatPage = '/chatPage';
  static String loveAlarm = '/loveAlarm';
  static String hasLover = '/hasLover';
  static String loveYima = '/loveYima';
  static String userCenter = '/userCenter';
  static String weInfo = '/weInfo';
  static String settingMyName = '/settingMyName';
  static String forgetPassword = '/forgetPassword';
  // static String communitySearch = '/communitySearch';

  // 路由找不到的时候要进入的页面
  static void configureRouters(Router router){
    router.notFoundHandler = Handler(
      handlerFunc: (BuildContext context, Map<String, List<String>> params){
        return Application.pageBuild;
      }
    );

    // 发表恋人动态的路由注册
    router.define(addLoveDynamicPage, handler: RouteHandlers.addLoveDynamicHandler);
    // 恋爱记录路由注册
    router.define(loveRecord, handler: RouteHandlers.loveRecord);
    // 展示每个item下的所有图片
    router.define(showImagesUI, handler: RouteHandlers.loveRecordShowImage);
    // 查看恋爱记录详情
    router.define(detailsItem, handler: RouteHandlers.detailsItem);
    // 恋爱相册
    router.define(loveGralley, handler: RouteHandlers.loveGralley);
    router.define(showGralley, handler: RouteHandlers.showGralley);
    // 社区页面点击显示高清图
    router.define(communityShowImageUI, handler: RouteHandlers.communityShowImageUI);
    // 社区文章详情页
    router.define(detailsPage, handler: RouteHandlers.detailsPage);
    // 广告页面结束后要跳转页面=》首页
    router.define(appIndexPage, handler: RouteHandlers.appIndexPage);
    // 广告页面结束后要跳转页面=》登录页面
    router.define(loginPage, handler: RouteHandlers.loginPage);
    // 注册页面
    router.define(registerPage, handler: RouteHandlers.registerPage);
    // BUG测试页面
    router.define(bugTest, handler: RouteHandlers.bugTest);
    // 新的底部导航栏
    router.define(newBottomBar, handler: RouteHandlers.newBottomBar);
    // 不规则底部导航栏
    router.define(oldBottomBar, handler: RouteHandlers.oldBottomBar);
    // 小游戏
    router.define(loveTree, handler: RouteHandlers.loveTree);
    // s打卡记录
    router.define(loveCard, handler: RouteHandlers.loveCard);
    // 恋爱记录
    router.define(loveRegister, handler: RouteHandlers.loveRegister);
    // 悄悄话
    router.define(loveMessage, handler: RouteHandlers.loveMessage);
    // 我的钱包
    router.define(myWallet, handler: RouteHandlers.myWallet);
    // 测试中心
    router.define(testCenter, handler: RouteHandlers.testCenter);
    // 钻石充值
    router.define(diamondRecharge, handler: RouteHandlers.diamondRecharge);
    // 用于测试页面
    router.define(appTest, handler: RouteHandlers.appTest);
    // 悄悄话页面
    router.define(chatPage, handler: RouteHandlers.chatPage);
    // 情侣闹钟
    router.define(loveAlarm, handler: RouteHandlers.loveAlarm);
    // 用于拦截没有绑定另一半
    router.define(hasLover, handler: RouteHandlers.hasLover);
    // 姨妈助手
    router.define(loveYima, handler: RouteHandlers.loveYima);
    // 个人简介
    router.define(userCenter, handler: RouteHandlers.userCenter);
    // 我们的信息
    router.define(weInfo, handler: RouteHandlers.weInfo);
    // 设置昵称
    router.define(settingMyName, handler: RouteHandlers.settingMyName);
    router.define(forgetPassword, handler: RouteHandlers.forgetPassword);
    // 社区搜索
    // router.define(communitySearch, handler: RouteHandlers.communitySearch);
  }
}